---
category: Validator
created: '2020-05-16'
title: Check if a string contains upper case characters
updated: '2021-10-13'
---

**JavaScript version**

```js containsUpperCase.js
const containsUpperCase = (str) => str !== str.toLowerCase();
```

**TypeScript version**

```ts containsUpperCase.ts
const containsUpperCase = (str: string): boolean => str !== str.toLowerCase();
```

**Examples**

```js examples.js
containsUpperCase('Hello World'); // true
containsUpperCase('hello world'); // false
```
